/**
 * Created by Administrator on 2017/1/6.
 */
window.onload=function () {
    var settingArr=[
        {
            id:1,
            headTime:"星期一 09:20",
            fullTime:"星期日 19:20",
            status:0,
        },
        {
            id:2,
            headTime:"星期一 09:20",
            fullTime:"星期日 19:20",
            status:1,
        },
        {
            id:3,
            headTime:"星期一 09:20",
            fullTime:"星期日 19:20",
            status:0,
        },
    ];

    var str = "";
    for (var i = 0; i < settingArr.length; i++) {
        var ifsetted=settingArr[i].status;
        str += "<tr>";
        str += "<td>" + settingArr[i].id + "</td>" +
            "<td>" + settingArr[i].headTime+"--"+ settingArr[i].fullTime + "</td>";
        str+=ifsetted==0?"<td>未启用</td><td><a href='#'>启用</td>":"<td>已启用</td><td><a href='#'>删除</td>";
        str += "</tr>";
    }
    $("#setting_tbody").html(str);

}